package pers.jzh.std.agent.attach.agentmodule;

import java.lang.instrument.Instrumentation;

public class AgentMain {

    public static void agentmain(String agentArgs, Instrumentation inst) {
        System.out.println("Hello Agent Main, args: "  + agentArgs);
        loadClass(inst);
    }

    private static void loadClass(Instrumentation inst) {
        Class[] allLoadedClasses = inst.getAllLoadedClasses();
        for (Class loadedClass : allLoadedClasses) {
            System.out.println("Loaded class " + loadedClass.getName());
        }
    }

}
